#include<iostream>
#include<vector>
#include<list>
using namespace std;


void printLost(vector<int> &l,list<int> &p){
    for(auto i = p.begin();i!=p.end();i++){
        cout << l[*i] << " ";
        
    }
    cout << endl;

}

int main(int argc, char *argv[])
{
    vector<int>a{12,23,34,54};
    list<int>b{1,2,3,1};
    printLost(a,b);


    return 0;
}
